import axios from 'axios'
import qs from "qs";

export default {
  //根据登录用户id获取项目列表
  getProjectInfoList(params) {
    return axios.get("/api/admin/project/info/getProjectInfoList", {params: params});
  },
  //根据登录用户id获取项目分页列表
  getProjectInfoPage(params) {
    return axios.get("/api/admin/project/info/getProjectInfoPage", {params: params});
  },
  //根据登录用户id，项目主键，获取文档列表
  getProjectDocPage(params) {
    return axios.get("/api/admin/project/info/getProjectDocPage", {params: params});
  },
  //根据项目主键获取项目信息
  getProjectById(params){
    return axios.get("/api/admin/project/info/getProjectById", {params: params});
  },
  //新增子项目
  saveChildrenProject(param) {
    return axios.post("/api/admin/project/info/saveChildrenProject", qs.stringify(param));
  },
  //更新子项目信息
  updateChildrenProject(param) {
    return axios.put("/api/admin/project/info/updateChildrenProject?" + qs.stringify(param));
  },
  //删除子项目信息
  deleteChildrenProject(param) {
    return axios.delete("/api/admin/project/info/deleteChildrenProject?" + qs.stringify(param));
  },
  //删除文档
  deleteDoc(param){
    return axios.delete("/api/admin/project/info/deleteDoc?" + qs.stringify(param));
  }

}
